package demo.beautyeye.tools;

import java.awt.*;

/**
 * Created by Administrator on 2018/7/8.
 */
public class ScreenTool {
    public static int getHeight(){
        return (int) Toolkit.getDefaultToolkit().getScreenSize().getHeight();
    }
    public static int getWidth(){
        return (int) Toolkit.getDefaultToolkit().getScreenSize().getWidth() ;
    }
    public static int getCenterBeginX(int width){
        return (int) ((Toolkit.getDefaultToolkit().getScreenSize().getWidth() - width)/2);
    }
    public static int getCenterBeginY(int height){
        return (int) ((Toolkit.getDefaultToolkit().getScreenSize().getHeight() - height)/2);
    }
}
